home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9614 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Message-ID: <960302.203405.15824@banshee.uunet.ca>
  2. Sender: nobody@banshee.uunet.ca
  3. Date: Sat, 02 Mar 1996 20:34:05 -0400
  4. X-Nntp-Posting-Host: tra25.travel-net.com
  5. Path: news.uunet.ca!tra25
  6. Newsgroups: comp.lang.c++
  7. From: ffisl@travel-net.com (Frantisek Fisl)
  8. Subject: NEWBIE QUE.: Compiler calling the wrong function???
  9. Organization: EnviroSoft
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12. When I compile a file containing the following code, I get this error message:
  13. error C2660: 'GetDlgItem' : function does not take 1 parameters
  14.  
  15. The function 'GetDlgItem' accepts one parameter as declared in MFC and two 
  16. parameters as a API function. So I think it's the API function that's being 
  17. called here. How do I make sure that the correct function (the MFC function) 
  18. gets called here?
  19.  
  20. void CPlmwinDoc::OnInputBmpNew()
  21. {
  22.   CBMPDlg dlg;
  23.  
  24.   int itemIndex;
  25.   CString BMPTypeText;
  26.         
  27.   CBMP* pBMPItem = new CBMP;
  28.  
  29. // HERE'S WHERE THE ERROR OCCURS:
  30.   itemIndex = ((CComboBox *)GetDlgItem(IDC_BMP))->GetCurSel();
  31.   ((CComboBox *)GetDlgItem (IDC_BMP))->GetLBText(itemIndex, PTypeText);
  32.         
  33.   pBMPItem->SetBMPType(BMPTypeText);
  34.   BMPList.AddTail (pBMPItem);
  35. }
  36.  
  37. ----------------------------------------------------------
  38.       v     v
  39. Frantisek Fisl, B.A.Sc.
  40. ffisl@travel-net.com
  41. http://www.travel-net.com/~ffisl
  42.  
  43. Ottawa, Ontario, Canada
  44. Tel. (613) 738-8628
  45. ----------------------------------------------------------
  46.